/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package scm.rawMaterialPurchasing.managedbean;

import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import scm.rawMaterialPurchasing.entity.RawMaterialPurchasingOrderEntity;
import scm.rawMaterialPurchasing.session.RawMaterialPurchasingSessionBean;

/**
 *
 * @author ReinforceII
 */
@ManagedBean
@ViewScoped
public class ViewPurchasingOrdersManagedBean {
    
    @EJB
    RawMaterialPurchasingSessionBean rawMaterialPurchasingSessionBean;
    
    private RawMaterialPurchasingOrderEntity selectedPurchasingOrder;

    /** Creates a new instance of ViewPurchasingOrdersManagedBean */
    public ViewPurchasingOrdersManagedBean() {
    }
    
    public List<RawMaterialPurchasingOrderEntity> getPurchasingOrders(){
        
        return rawMaterialPurchasingSessionBean.getAllPurchasingOrders();
    }

    /**
     * @return the selectedPurchasingOrder
     */
    public RawMaterialPurchasingOrderEntity getSelectedPurchasingOrder() {
        return selectedPurchasingOrder;
    }

    /**
     * @param selectedPurchasingOrder the selectedPurchasingOrder to set
     */
    public void setSelectedPurchasingOrder(RawMaterialPurchasingOrderEntity selectedPurchasingOrder) {
        this.selectedPurchasingOrder = selectedPurchasingOrder;
    }
}
